<?php

namespace Forms;

/**
 * 列表表单
 */
class AbstractListModel extends \Forms\AbstractModel {

    /**
     * 设置通用的字段
     */
    protected $_commonFields = array(
        'page'        => array(
            'label'    => 'page',
            'name'     => 'page',
            'require'  => false,
            'default'  => "1",
            "validate" => array(
                array("type" => "int", "min" => "1", "msg" => "page不正确")
            ),
        ),
        'count'       => array(
            'label'    => 'count',
            'name'     => 'count',
            'require'  => false,
            'default'  => "10",
            "validate" => array(
                array("type" => "int", "min" => "1", "msg" => "count不正确")
            ),
        ),
        'need_fields' => array(
            'label'    => 'need_fields',
            'name'     => 'need_fields',
            'require'  => true,
            "validate" => array(
                array("type" => "string", "max" => "200", "msg" => "所需字段信息不正确")
            ),
        ),
        'need_first'  => array(
            'label'    => 'need_first',
            'name'     => 'need_first',
            'require'  => false,
            'default'  => "0",
            "validate" => array(
                array("type" => "int", "min" => "0", "max" => "1", "msg" => "need_first不正确")
            ),
        ),
        'need_total'  => array(
            'label'    => 'need_total',
            'name'     => 'need_total',
            'require'  => false,
            'default'  => "0",
            "validate" => array(
                array("type" => "int", "min" => "0", "max" => "1", "msg" => "need_total不正确")
            ),
        ),
        'order'       => array(
            'label'   => 'order',
            'name'    => 'order',
            'require' => false,
        ),
    );

}
